﻿using Autofac;
using System;
using System.Collections.Generic;
using System.Text;

namespace Common.IOC
{
    public class ConfigureAutofac:Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            IoCContainer.Builder = builder;
            IoCContainer.RegisterNew("Dal", "Dal");
            IoCContainer.Build();
            IoCContainer.Builder.RegisterBuildCallback(c => {
                IoCContainer.Container= c as IContainer;
            });
        }
    }
}
